function multiwave_gpu(file, seconds)
    if nargin < 2, seconds = 0; end
     if seconds == 0
        [y, Fs] = wavread(file);      % data= y, sampling freq = Fs
    else
        [y, Fs] = wavread(file,[1 44100*seconds]);      % data= y, sampling freq = Fs
    end
    player = audioplayer(y,Fs);
    
    t = (1:length(y))/Fs;
    t = gsingle(t);
    y = gsingle(y);
    gfigure;
    
    timeSkip = 1000/44100; %how many samples to skip ahead with.
    
    lenY = length(y);
    myt = tic;
    numSeconds = 0;
    a= size(y);
    lengthSong = a(1)/Fs;
    
    history = gsingle(); %the buffer to keep for the past.
    lastChanged = 1; %for the fading effect
    numToRemember = 10; % length of history buffer
    
    
    play(player);
    while numSeconds<lengthSong
        tic
        numSeconds = toc(myt);
        indnew = [ceil((numSeconds-timeSkip)*44100) ceil((numSeconds+timeSkip)*44100)];
        
        if (indnew(1) <= 0)
            indnew(1) = 1;
        end
        if (indnew(2) >= lenY)
            indnew(2)= lenY;
        end
        ind = [indnew(1):indnew(end)];
        if length(ind) == 0
            break;
        end
        upperlimit = gones(ind(end)-ind(1), 1)*.9;
        plot(upperlimit);
        ghold_on
        plot(upperlimit*-1); %lower limit
        
        plot(y(ind)*2) %plotting the data
        
        
        [a b] = size(history);
        
        for i=1:b
            plot(history(:,i));
            
        end
        ghold_off
        [c d] = size(y(ind));
        if c == 2001
            [a b] = size(history);
            if b<numToRemember
                history = horzcat(history, y(ind));
            else
                history(:,lastChanged) = y(ind);
                lastChanged=lastChanged+1;
                if lastChanged == numToRemember+1
                    lastChanged = 1;
                end
            end %end if statement
        end %end making surte we're adding the same length
        
        
        ghold_off;
        
        toc;
        pause(.05);
        
    end
    
    
    
